from activist.Data import Data
from activist.MetaData import MetaData

class Topic(Data):

    def __init__(self,name,description):
        self._name = name
        self._description = description
        self.id()

        super(Topic,self).__init__()

    def getXML(self):
        return """
<topic class="activist.Topic" id="%(id)s">
  <name>%(name)s</name>
  <description>%(description)s</description>
%(meta)s
</topic>
""" % { "id": self.id(),
        "name": self._name,
        "description": self._description,
        "meta":self.getMetaXML()
        }

